-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DeployAccount Method to account/account.go for Issue #381 #445
base: main
Are you sure you want to change the base?
Conversation
Thanks for this contribution! I see it still has a [WIP] at the beginning of the title, does this mean it still not ready for review? Can we change it into a draft if that's the case? Do you want us to take a look now even if it still not ready? |
Sorry, was out for a conference for the last week I will work on it more, I'll request for a review after :) |
it's something really small by the way 👍 Can you review it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left some comments.
…issue-382 Merge origin with feature
…teAddDeployAccount - Created a separate example for CreateAndExecuteAddDeployAccount - Merged with upstream and updated CreateAndExecuteAddDeployAccount (Fixed issues mentioned in NethermindEth/pull/445)
Just made the changes you asked, let me know if there's something more 😄 |
ConstructorCalldata []*felt.Felt // ConstructorCalldata contains the calldata to be passed to the constructor of the account contract upon deployment. | ||
} | ||
|
||
func (account *Account) CreateAndExecuteAddDeployAccount(options DeployOptions) (*rpc.AddDeployAccountTransactionResponse, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for rpcv05 and lower. However, rpcv06 introduces a new deployAccount transaction version (v3), meaning users won't be able to use this method to submit v3 transactions. It would be great if we could make this compatible with both transaction versions (eg by accepting the transaction as an argument, tx rpc.DeployAccountType)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure will fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by "this method" you mean the whole method "CreateAndExecuteAddDeployAccount" or the way you deploy accounts like in the function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CreateAndExecuteAddDeployAccount method.
Introduces a new DeployAccount method in account/account.go, aiming to simplify the process of account deployment on StarkNet as outlined in Issue #381. The DeployAccount method encapsulates multiple functions into a single call, making it easier and more intuitive for users to deploy accounts.
TODO: